These are the legs of a hairpin used by craftsmen.
It is used for front-end styling for all hairstyles, such as for Shichi-Go-San and Coming-of-Age ceremonies.
The front insert is a part used for the tsumami kanzashi (hand-held kanzashi) for the front of the head for Shichi-Go-San (Japanese hairstyle) and bridal ceremonies. It moves