The board of supervisors of every county, or the boards of supervisors of counties acting under the joint powers provisions of Article 1 (commencing with Section 6500) of Chapter 5 of Division 7 of Title 1 of the Government Code shall establish a community mental health service to cover the entire area of the county or counties. Services of the State Department of Health Care Services shall be provided to the county, or counties acting jointly, or, if both parties agree, the state facilities may, in whole or in part, be leased, rented or sold to the county or counties for county operation, subject to terms and
conditions approved by the Director of General Services.